<template>
	<view class="search" :style="{backgroundColor}">
		<view class="search-content" :style="{'border-radius': radius + 'px' }" @click="handlerClick">
			<!-- 图标 -->
			<uni-icons type="search" size="14" />
			<!-- 文字 -->
			<slot></slot>
		</view>
	</view>
</template>

<script>
	export default {
		name:"my-search",
		props: {
			backgroundColor: {
				type: String,
				default: '#c00000'
			},
			radius: {
				type: Number,
				default: 18
			}
		},
		data() {
			return {
				
			}
		},
		methods: {
			handlerClick() {
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss">
.search {
	height: 50px;
	display: flex;
	align-items: center;
	padding: 0 10px;
	font-size: 14px;
	.search-content {
		background-color: #fff;
		height: 35px;
		width: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
	}
}
</style>